CygNet Studio > Using CygNet Studio Tools and Controls > Group Grid Tool > Properties, Events, and Methods > Methods

Group Grid Tool – Methods

The following table lists and describes methods of the Group Grid Tool. Methods are accessed using the control's script editor. See CxGrpGrid Methods for more information about using these methods in script.

Note: If a property or method in the script editor has two forms with the same name, one form exists for legacy support and the other form is current. When possible, use the current form. To select the current form, append .X. to the name of the object to which the property or method applies, and then enter the property or method name. For instance, enter MyObject.X.MyProperty. If a property or method in the script editor has only one form, the X method might or might not apply. The X method column in the table below indicates whether or not a property or method is accessible using the X method.

Method X Method Description

AboutBox

Yes

The AboutBox method displays an About dialog box for the control.

AlarmAcknowledge

No

The AlarmAcknowledge method acknowledges an alarm.

ClearCols

Yes

The ClearCols method clears the configuration XML for all columns, leaving them blank. Do not call this method when the grid is in Run mode.

ClearMenu

No

The ClearMenu method clears all custom items from the context menu.

Syntax

ClearMenu()

Parameters
  • This method takes no parameters.
Return Values
  • This method returns no values.

ClearRows

Yes

The ClearRows method clears the configuration XML for all rows, leaving them blank. Do not call this method when the grid is in Run mode.

Export

Yes

The Export method exports the contents of the grid to a temporary CSV file and opens the file with the default spreadsheet viewer for the user to view and save to disk.

FacilityConfig

No

FindCol

Yes

The FindCol method returns the column number matching the specified label text.

GetCellValue

Yes

The GetCellValue method returns the value for a cell.

GetDisplayColsXml

Yes

The GetDisplayColsXml method get the display columns as XML.

GetDlgCtrlID

No

The GetDlgCtrlID method returns the numeric resource identifier of the control within TheView.

GetGroup

No

The GetGroup method returns the object group to which an object belongs, and returns null if the object does not belong to a group. The GroupID property returns the GroupID. Calling GetGroup is equivalent to calling TheView GetGroupByID and passing the value of the object’s GroupID property, and is provided for convenience.

Yes

The GetPointAttributeByCell method queries a grid’s cache to retrieve a point or facility attribute for a cell by the cell's column and row number. This allows the retrieval of point and facility information that may have already been compiled elsewhere on a screen.

Yes

The GetPointAttributeForTag method queries a grid’s cache to retrieve a tag’s attribute from a point tag. This allows the retrieval of point and facility information that may have already been compiled elsewhere on a screen.

GetPointTag

Yes

The GetPointTag method returns the point tag for an individual cell in the tool's grid. Its syntax is as follows:

GetPointTag(Column As Long, Row As Long) As Object

Example

The following example illustrates how to "catch" the return:

dim pTag

Set pTag=groupgrid1.X.GetPointTag (1,0)

Also see the PointTag object.

GetRows

Yes

The GetRows method returns the count of rows in the grid.

GetSelectedRow

Yes

The GetSelectedRow method returns the zero-based index of the selected row or –1 if no row is currently selected.

GetSingleSortColumn

Yes

The GetSingleSortColumn method returns the sort column in single column sort mode. This method is only used for a grid that has the Single Column option set for Sorting and Grouping in the OCX Properties.

GetSortOrder

Yes

The GetSortOrder method returns the sort order for the current sort mode. For a list of possible values returned by this method, see the ESortOrder Enumeration Table.

HistoryAlarms

No

The HistoryAlarms method calls the Alarm History dialog box, which shows the alarm history of an individual alarm, and provides options for showing only particular types of alarm events. See Alarm History for more information.

HistoryValues

No

The HistoryValues method calls the History Values dialog box, which shows all the history records for a given point, including additional information if the history name came from the PNT. See History Records for more information.

IsSelected

No

The IsSelected method indicates if the tool or control is selected. Can be used with [ContextMenuAutoSelect].

LayerName

No

The LayerName method gets the name of the layer on which the object resides.

Move

No

The Move method moves an object by the specified amount, relative to its current position.

OnUpdate

No

The OnUpdate method updates the control to ensure that any property modifications have taken effect.

OnUpdateResize

No

The OnUpdateResize method updates the control to ensure that any modifications to its boundary have taken effect.

OnUpdateStyle

No

The OnUpdateStyle method updates the control to ensure that any modifications to its style properties have taken effect.

PointConfigAlarmSettings

No

 

PointConfigAlarmSuppression

No

 

PointConfigAll

No

 

PointConfigComments

No

 

PointConfigQuestionable

No

 

RegisterPointForChangeNotice

No

The RegisterPointForChangeNotice method registers an unrelated point on a screen that may change its value. Used in conjunction with EventPointChange.

RemoveMenuItem

No

 

Print

Yes

The Print method prints the contents of the control, grid, or viewer. When this method is called, the Print dialog box is shown to allow configuration.

Restart

Yes

For objects, the Restart method stops and restarts Run mode. For TheFrame/TheView, the Restart method restarts TheView with new site, service, and facility information, if applicable.

RunInitialize

No

The RunInitialize method runs the object’s EventInitialize event code.

RunPumpData

No

This method is not used.

Select

No

The Select method selects the tool or control. "True" to select, "false" to deselect. Can be used with [ContextMenuAutoSelect].

SelectRow

Yes

The SelectRow method selects a specified grid row. This method will return false if the specified row does not exist or is unable to be selected.

SetCellValue

Yes

The SetCellValue method sets the value for a cell. This method will throw an error if the specified cell does not exist, or if the specified column does not permit user values.

SetDisplayColsXml

Yes

The SetDisplayColsXml method sets the display columns from XML.

SetFocus

No

The SetFocus method sets the focus to the control.

SetHistoryPlaybackMode

Yes

The SetHistoryPaybackMode method sets the history playback mode. This method is obsolete. It is automatically called by CygNet Studio when entering History Playback Mode.

SetHistoryPlaybackTime

Yes

The SetHistoryPlaybackTime method sets the history playback time . This method is obsolete. It is automatically called by CygNet Studio while in History Playback Mode.

SetMenuItem

No

The SetMenuItem method is called to control an item in the context menu for the tool.

SetSubMenuItem

No

The SetSubMenuItem method is called to control an item in a nested sub-menu in the context menu for the tool.

The parameters that are passed in include:

  • EventID — The unique ID of the selected context menu item that is passed to the EventContextMenu event handler.
  • Description — The text string that is displayed in the context menu item.
  • ValidTagOnly — The context menu item is enabled only if the button or tool has a valid tag.
  • Disabled — Manually enable or disable the context menu item.

SetSingleSort

Yes

The SetSingleSort method sets the sort column and order in single column sort mode. This method is only used for a grid that has the Single Column option set for Sorting and Grouping in the OCX Properties. This method will return false if the grid is not in single column sort mode, if the specified sort order is invalid, or if the specified column does not exist.

SetSingleSortColumn

Yes

The SetSingleSortColumn method sets the sort order in single column sort mode. This method is only used for a grid that has the Single Column option set for Sorting and Grouping in the OCX Properties. This method will return false if the grid is not in single column sort mode, or if the specified column does not exist.

SetSortOrder

Yes

The SetSortOrder method sets the sort order for the current sort mode. This method will return false if the specified sort order is already in use by the grid, or if the specified sort order is invalid.

ShowConfiguration

No

ShowCurrentValue

No

ShowRowNumbers

Yes

The ShowRowNumbers method shows/hides row numbers. This method will return the previous state of row number visibility. That is, if row numbers were visible prior to calling this method, it will return true; otherwise, it will return false.

Start

Yes

The Start method configures the control and starts Run mode.

Stop

Yes

The Stop method stops Run mode.

TrendAddPoint

No

 

TrendRemovePoint

No

 

TrendSinglePoint

No

 

TrendSinglePointRollup

No

 

X

No

The X method returns an object that lists properties and methods specific to an ActiveX control. This method is only available for some ActiveX controls.

Back to top

Let us know how we can improve this topic.

CygNet at weatherford.com

© 2020 Weatherford. All rights reserved.